A Mechanically Checked Proof of aMultiprocessor Result via
نویسندگان
چکیده
We describe a mechanically checked correctness proof for a system of n processes, each running a simple, non-blocking counter algorithm. We prove that if the system runs longer than 5n steps, the counter is increased. The theorem is formalized in applicative Common Lisp and proved with the ACL2 theorem prover. The value of this paper lies not so much in the trivial algorithm addressed as in the method used to prove it correct. The method allows one to reason accurately about the behavior of a concurrent , multiprocess system by reasoning about the sequential computation carried out by a selected process, against a memory that is changed externally. Indeed, we prove general lemmas that allow shifting between the multiprocess and uniprocess views. We prove a safety property using a multiprocess view, project the property to a uniprocess view, and then prove a global progress property via a local, sequential computation argument. 1 Informal Discussion of the Problem Consider a system of n processes each executing the ve step program in Figure 1 in a shared memory. The execution model we use is that each of the ve instructions is atomic and they are executed in an interleaved way by the various processes. Naively, each process is simply incrementing a shared global counter, CTR, non-atomically. The variables old and new are local to each process. Instruction 2 is just a \compare and swap" (CAS). The instruction either writes new to CTR or reads CTR into old. In either case, it sets new to a Boolean indicating which branch was taken. The type of new is thus integer or Boolean. The program could be simpliied by deleting instruction 3 and using instruction 4 to loop back to the top in both cases. As written, instruction 4 serves as a
منابع مشابه
A Mechanically Checked Proof of theCorrectness of the Kernel of the AMD 5 K 86
We describe a mechanically checked proof of the correctness of the kernel of the oating point division algorithm used on the AMD5 K 86 microprocessor. The kernel is a non-restoring division algorithm that computes the oating point quotient of two double extended precision oating point numbers, p and d (d 6 = 0), with respect to a rounding mode, mode. The algorithm is deened in terms of oating p...
متن کاملA Machine-Checked Proof of the Optimality of a Real-Time Scheduling Policy
We describe a mechanically-checked proof of the optimality of earliest-deadline-rst (EDF) schedulers on periodic tasks accomplished using the Nqthm theorem prover. We present a formalization of the theorem and discuss why the machine-checked proof is both more complex and more reliable than a corresponding informal proof.
متن کاملA Mechanized Proof of Higman’s Lemma by Open Induction
I present a short, mechanically checked Isabelle/HOL formalization of Higman’s lemma by open induction.
متن کاملA Mechanically Checked Proof of the Correctness of the Boyer-Moore Fast String Searching Algorithm
We describe a mechanically checked proof that the Boyer-Moore fast string searching algorithm is correct. This is done by expressing both the fast algorithm and the naïve (obviously correct) algorithm as functions in applicative Common Lisp and proving them equivalent with the ACL2 theorem prover. The algorithm verified differs from the original Boyer-Moore algorithm in one key way: the origina...
متن کاملA Mechanically Checked Proof of Ieee Compliance of the Floating Point Multiplication, Division and Square Root Algorithms of the Amd-k7tm Processor
We describe a mechanically verified proof of correctness of the floating point multiplication, division, and square root instructions of the AMD-K7 microprocessor. The instructions are implemented in hardware and represented here by register-transfer level specifications, the primitives of which are logical operations on bit vectors. On the other hand, the statements of correctness, derived fro...
متن کامل